<style lang="less" scoped>
 @import  '../.././commom/less/base';
 .my {font-family:"HYQiHei";background: #fff;}
 .myBg {.w-h(750,490);
 background: url('../.././static/image/mys.png') top center no-repeat;
 background-size: 100% 490rpx;
 .t-center;
 .via {  .pt(150);
	 .t { 
		 .w-h(128,128);margin:0 auto;
		background:rgba(255,255,255,1);
		border-radius:50%;
		.t-center;
		overflow: hidden;
		.img {
			width: 100%;
			height: 100%;
		}
	 }
	 .t+ view {
		 .mt(12);
		 .t-center;
		 font-size: 32rpx;
		 text {
			 color: #fff; 
		 }
	 }
 }
 } 
 .title {
	text-align: center;
	color: #fff;
	position: absolute;
	left: 50%;
	margin-left: -60rpx;
	top:70rpx;
 }
 .list {
	 width: 92%;
	 margin:0 auto;
	 margin-top: 60rpx;
	 .nav {
		 display: block;
		 width: 100%;
		 display: flex;
		 justify-content: space-between;
		 border-bottom: 1px #ddddddb5 solid;
		 padding-bottom: 15rpx;
		 padding-top: 15rpx;
		 margin-top: 25rpx;
		 text {
			 font-size: 28rpx;
			 color: #333;
		 }
		 .icon {
			     position: relative;
			     top: -15rpx;
		 }
	 }
 }
 .loginOut {
	 width: 260rpx;
	 margin:0 auto;
	 margin-top: 200rpx;
	 border:1px #ddd solid;
	 height: 80rpx;
	 border-radius: 40rpx;
	 line-height: 80rpx;
	 background: transparent;
	 text-align: center;
	 color: #999;
 }
</style>
<template>
    <view class="my">
	<p class="title">云步e园</p>
    	<view class="myBg">
    			  <view class="via">
    				  <view class="t"><image class="img" :src="user.avatarUrl"></image></view>
    				  <view>
    					  <text>{{ user.nickName }} | {{ user.gender == 0 ? '女' : '男' }}</text>
    				  </view>
    			  </view>
    	</view>
		<view class="list">
			<navigator hover-class="none" v-for="(nav, index) of navs" :key="index" class="nav" :url="nav.url"><text>{{ nav.txt }}</text><uni-icons  class="icon" type="arrowright" size="25" color="#bbbbbbc7"></uni-icons></navigator>
		</view>
		<view @click="loginOut" class="loginOut" type="default">退出登录</view>
 
    </view>
</template>
 <script>
	 export default {
		 data () {
				return {
					user: {},
					navs: [
						{
							url: '../searchCode/searchCode',
							txt: '我的通行码'
						},
						{
							url: '../visitingBook/searchVisitorMsg',
							txt: '最近预约记录'
						},
						{
							url: '../trafiicRecords/trafiicRecords',
							txt: '最近通行记录'
						}
					]
				}
	     },
		 methods: {
			  loginOut() {
				  uni.removeStorageSync('wxUser')
				  uni.reLaunch({url:'/pages/login/login'})
			  }
		 },
		 mounted() {
			 this.user = uni.getStorageSync('wxUser');
			 console.log(this.user)
		 }
	 }
 </script>
